import configApi from 'utils/config.js';

const config  = {
	index: {
		iconPath: configApi.appurlImg + "/tabbar/home.png",
		selectedIconPath: configApi.appurlImg + "/tabbar/selectedHome.png",
		text: '首页',
		isDot: false,
		customIcon: false,
		pagePath: "/pages/menu/home",
	},
	order: {
		iconPath: configApi.appurlImg + "/tabbar/order.png",
		selectedIconPath: configApi.appurlImg + "/tabbar/selectedOrder.png",
		text: '订单',
		isDot: false,
		customIcon: false,
		pagePath: "/pages/menu/order",
	},
	place: {
		iconPath: configApi.appurlImg + "/tabbar/add.png",
		selectedIconPath: configApi.appurlImg + "/tabbar/add.png",
		text: '快速下单',
		isDot: false,
		customIcon: false,
		midButton: true,
		pagePath: "/pages/menu/add",
	},
	message: {
		iconPath: configApi.appurlImg + "/tabbar/message.png",
		selectedIconPath: configApi.appurlImg + "/tabbar/selectedMessage.png",
		text: '消息',
		isDot: false,
		customIcon: false,
		pagePath: "/pages/menu/message",
	},
	mine: {
		iconPath: configApi.appurlImg + "/tabbar/my.png",
		selectedIconPath: configApi.appurlImg + "/tabbar/selectedMy.png",
		text: '我的',
		isDot: false,
		customIcon: false,
		pagePath: "/pages/menu/my",
	},
};

export function getTabbarConfig(is_agent = false){
	let tabbar = [];
	// if(is_agent){	
		for(let key in config){
			tabbar.push(config[key]);
		}
	// }else{
	// 	let tabbar_keys = ['index', 'house', 'mine'];
	// 	tabbar_keys.forEach(key => {
	// 		tabbar.push(config[key]);
	// 	});
	// }

	return tabbar;
}